<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="VB" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>

<mobile:Form runat="server" id="first">
   <mobile:SelectionList runat="Server" id="List1" runat="server"
                         SelectType="CheckBox">
      <Item Text="Richard Anderson" />
      <Item Text="Brian Francis" />
      <Item Text="Alex Homer" />
      <Item Text="Dave Sussman" />
      <Item Text="Karli Watson" />
   </mobile:SelectionList>
   <mobile:Command id="nextForm" runat="server" SoftkeyLabel="Next"
                   Text="Next" onClick="nextForm_click"/>
</mobile:Form>

<mobile:Form runat="server" id="second">
   Selected:
   <mobile:Label id="names" runat="server"/> 
</mobile:Form>

<script runat="server" Language="VB">

Sub nextForm_click(sender As Object, e As System.EventArgs)
   Dim selectionCount As New Integer()
   Dim item As MobileListItem
   selectionCount = 0
   names.Text = ""
   For Each item In List1.Items
      If item.Selected Then
         If selectionCount <> 0 Then
            names.Text += ", "
         End If
         names.Text += item.Text
         selectionCount += 1
      End If
   Next
   If selectionCount = 0 Then
      names.Text = "None"
   End If
   ActiveForm = second
End Sub

</script>
